<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %><%@taglib uri="http://www.icesoft.com/icefaces/component" prefix="ice" %>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Listing Files Items</title>
            <link rel="stylesheet" type="text/css" href="/WebIDE-war/faces/jsfcrud.css" />
        </head>
        <body>
            <ice:panelGroup id="messagePanel" layout="block">
                <ice:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </ice:panelGroup>
            <h1>Listing Files Items</h1>
            <ice:form styleClass="jsfcrud_list_form">
                <ice:outputText escape="false" value="(No Files Items Found)" rendered="#{files.pagingInfo.itemCount == 0}" />
                <ice:panelGroup rendered="#{files.pagingInfo.itemCount > 0}">
                    <ice:outputText value="Item #{files.pagingInfo.firstItem + 1}..#{files.pagingInfo.lastItem} of #{files.pagingInfo.itemCount}"/>;
                    <ice:commandLink action="#{files.prev}" value="Previous #{files.pagingInfo.batchSize}" rendered="#{files.pagingInfo.firstItem >= files.pagingInfo.batchSize}"/>;
                    <ice:commandLink action="#{files.next}" value="Next #{files.pagingInfo.batchSize}" rendered="#{files.pagingInfo.itemCount >= files.pagingInfo.lastItem + files.pagingInfo.batchSize}"/>;
                    <ice:commandLink action="#{files.next}" value="Remaining #{files.pagingInfo.itemCount - files.pagingInfo.lastItem}"
                                   rendered="true"/>
                    <ice:dataTable value="#{files.filesItems}" var="item" border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px">
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText value="Id"/>
                            </f:facet>
                            <ice:outputText value=" #{item.id}"/>
                        </ice:column>
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText value="Name"/>
                            </f:facet>
                            <ice:outputText value=" #{item.name}"/>
                        </ice:column>
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText value="Created"/>
                            </f:facet>
                            <ice:outputText value="#{item.created}">
                                <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                            </ice:outputText>
                        </ice:column>
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText value="Modified"/>
                            </f:facet>
                            <ice:outputText value="#{item.modified}">
                                <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                            </ice:outputText>
                        </ice:column>
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText value="ProjectId"/>
                            </f:facet>
                            <ice:outputText value=" #{item.projectId}"/>
                        </ice:column>
                        <ice:column>
                            <f:facet name="header">
                                <ice:outputText escape="false" value=";"/>
                            </f:facet>
                            <ice:commandLink value="Show" action="#{files.detailSetup}">
                                <f:param name="jsfcrud.currentFiles" value="#{jsfcrud_class['webidewar.jsf.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][files.converter].jsfcrud_invoke}"/>
                            </ice:commandLink>
                            <ice:outputText value=" "/>
                            <ice:commandLink value="Edit" action="#{files.editSetup}">
                                <f:param name="jsfcrud.currentFiles" value="#{jsfcrud_class['webidewar.jsf.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][files.converter].jsfcrud_invoke}"/>
                            </ice:commandLink>
                            <ice:outputText value=" "/>
                            <ice:commandLink value="Destroy" action="#{files.destroy}">
                                <f:param name="jsfcrud.currentFiles" value="#{jsfcrud_class['webidewar.jsf.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][files.converter].jsfcrud_invoke}"/>
                            </ice:commandLink>
                        </ice:column>
                    </ice:dataTable>
                </ice:panelGroup>
                <br />
                <ice:commandLink action="#{files.createSetup}" value="New Files"/>
                <br />
                <ice:commandLink value="Index" action="welcome" immediate="true" />
                
            </ice:form>
        </body>
    </html>
</f:view>
